<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>宁波分公司通讯录系统</title>
<!-- Bootstrap -->

</head>
<body>
<iframe  width=100% height=300 scrolling="no" src="http://10.111.4.5/top.htm" frameborder="no" noresize="NoResize"></iframe>
	<br>
	<br>
	<br>
	<br>

	<form  method="post">
		<table WIDTH="90%" ALIGN=center BORDER=0 CELLSPACING=2 CELLPADDING=2><tr ><td>部门选择：</td>
		<td  ><select  id="bumen"   >
			<option value="" selected >请选择</option>
			<option value='总经理室'>总经理室</option>
			<option value='办公室'>办公室</option>
			<option value='人力资源部' >人力资源部</option>
			<option value='财务部' >财务部</option>
			<option value='企划部' >企划部</option>
			<option value='个人业务部' >个人业务部</option>
			<option value='银保系列' >银保系列</option>
			<option value='教育培训部' >教育培训部</option>
			<option value='运营服务部'>运营服务部</option>
			<option value='保费部'>保费部</option>
		</select></td>
	<td>姓名：</td><td><input type="text" placeholder="Search"   style="FONT-SIZE: 12px;WIDTH: 150px"   maxlength=25 id="name"  /></td>
		<td><input type="button" onClick="search();" value="查询" /></td></tr>
		</table>
	</form>
	<!-- Button to trigger modal 
	<a href="#myModal" role="button" class="btn" data-toggle="modal">查看邮件列表</a>

	<!-- Modal  弹出对话框内存 （用于邮件地址复制）
	<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal"
				aria-hidden="true">×</button>
			<h3 id="myModalLabel">Modal header</h3>
		</div>
		<div class="modal-body">
			<p>One fine body…</p>
		</div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
			<button class="btn btn-primary">Save changes</button>
		</div>
	</div> -->
	<br><br>
	<!--邮件条件筛选开始-->
	<div class="accordion" id="accordion2">
		<div class="accordion-group">
			<div class="accordion-heading">
				<a class="accordion-toggle btn btn-info" data-toggle="collapse"
					data-parent="#accordion2" href="#collapseOne"> 邮件地址筛选条件选择 </a>
			</div>
			<div id="collapseOne" class="accordion-body collapse">
				<div class="accordion-inner">
					<form  method="post" name="myform">
						<table>
							<!-- <tr>
								<!--<td>性别:</td>
								<td><label class="checkbox inline"> <input
										type="checkbox" id="inlineCheckbox1" value="1"
										checked="checked">男
								</label> <label class="checkbox inline"> <input type="checkbox"
										id="inlineCheckbox2" value="2" checked="checked">女
								</label></td>
							</tr> -->
							<tr>
								<td>职务：</td>
								<td>
									<label class="checkbox inline"> 
										<input type="checkbox" name="zhiwei" value="1"> 总经理室成员
								</label> 
								<label class="checkbox inline"> 
									<input type="checkbox" name="zhiwei" value="2">
								    分公司部门负责人								</label>
								<label class="checkbox inline"> 
									<input type="checkbox" name="zhiwei" value="3"> 片区负责人
								</label> 
								<label class="checkbox inline"><input type="checkbox" name="zhiwei" value="4"> 支公司、营销服务部负责人</label>
							
								
								<label class="checkbox inline"><input
										type="checkbox" name="zhiwei" value="5"> 组训</label> <label
									class="checkbox inline"><input type="checkbox"
										name="zhiwei" value="6">
										支公司、营销服务部综合内勤</label></td>
							</tr>
							<tr>
								<td>部门：</td>
								<td><label class="checkbox inline"> <input
										type="checkbox" name="bumen" value="办公室">办公室
								</label>
								<label class="checkbox inline"> <input
										type="checkbox" name="bumen" value="人力资源部">人力资源部
								</label>
								<label class="checkbox inline"> <input
										type="checkbox" name="bumen" value="财务部">财务部
								</label>
								<label class="checkbox inline"> <input
										type="checkbox" name="bumen" value="企划部">企划部
								</label>
								<label class="checkbox inline"> <input
										type="checkbox" name="bumen" value="个人业务部">个人业务部
								</label>
								<label class="checkbox inline"> <input
										type="checkbox" name="bumen" value="银行保险业务发展部">银行保险业务发展部
								</label>
								<label class="checkbox inline"> <input
										type="checkbox" name="bumen" value=银行保险销售支援部>银行保险销售支援部
								</label>
								<label class="checkbox inline"> <input
										type="checkbox" name="bumen" value="教育培训部">教育培训部
								</label>
								<label class="checkbox inline"> <input
										type="checkbox" name="bumen" value="运营服务部">运营服务部
								</label>
								<label class="checkbox inline"> <input
										type="checkbox" name="bumen" value="保费部">保费部
								</label></td>
							</tr>
							
<tr><td><input type = "button" value = "提交"  onclick="showemail();" class="btn btn-primary" >
</td>
</tr>
						</table>
					</form>
				</div>
			</div>
		</div>
	</div>
	<br>
	<br>
	

	<div class="container" style="width: 77%;" id="txl_grid"></div>
	<iframe  width=100% height=300 scrolling="no" src="http://10.111.4.5/bottom.htm" frameborder="no" noresize="NoResize"></iframe>
	<!-- jQuery 1.7.2 or higher -->
  <script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>


	<script src="resources/js/jquery-1.9.0.min.js"></script>
	<script src="resources/js/bootstrap.min.js"></script>
	<script type="text/javascript">
	$(function(){	
		search();
	});
	function search(){
		var bumen=$("#bumen").val();
		var name=$("#name").val();
		$("#txl_grid").load("txlgrid",{"bumen":bumen,"name":name});
	}
	
	function showemail(){

		var zhiwei=getZhiwei();
		var bumen=getBumen();
		window.location.href="showgrid?zhiwei="+zhiwei+"&bumen="+bumen;
		//$("#showgrid").load("showgrid",{"zjl":zjl,"bm":bm,"pq":pq,"fzr":fzr,"zx":zx,"zhnq":zhnq,"bumen":bumen});
	} 
	
/* 	function showemail(){

		var zjl=$("#zjl").filter(":checked").length;
		var bm=$("#bm").filter(":checked").length;
		var pq=$("#pq").filter(":checked").length;
		var fzr=$("#fzr").filter(":checked").length;
		var zx=$("#zx").filter(":checked").length;
		var zhnq=$("#zhnq").filter(":checked").length;
		var bumen=getBumen();
		console.log($("#zjl").filter(":checked").length);
		window.location.href="showgrid?zjl="+zjl+"&bm="+bm+"&pq="+pq+"&fzr="+fzr+"&zx="+zx+"&zhnq="+zhnq+"&bumen="+bumen;
		//$("#showgrid").load("showgrid",{"zjl":zjl,"bm":bm,"pq":pq,"fzr":fzr,"zx":zx,"zhnq":zhnq,"bumen":bumen});
	} */
	function getZhiwei(){
		var zhiwei="";
		var $cks=$("input[type='checkbox'][name='zhiwei']:checked");
		var len = $cks.length;
		if(len==0){
			return null;
		}else{
			$cks.each(function(index){
	   			if(index==len-1){
	   				zhiwei+=$(this).val();
	   			}else{
	   				zhiwei+=$(this).val()+",";
	   			} 
			});
		}
		return zhiwei;
}

	function getBumen(){
			var bumen="";
			var $cks=$("input[type='checkbox'][name='bumen']:checked");
			var len = $cks.length;
			if(len==0){
				return null;
			}else{
				$cks.each(function(index){
		   			if(index==len-1){
		   				bumen+=$(this).val();
		   			}else{
		   				bumen+=$(this).val()+",";
		   			} 
				});
			}
			return bumen;
	}
	</script>
	
</body>
 
</html>
  